<div th:fragment="fafang">
<div id="fafangModal" style="" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="fafangLabel" aria-hidden="true" data-keyboard="false">
    <div class="modal-dialog modal-md" style="width:1000px;" id="fafangmodal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="fafangLabel"></h4>
            </div>
            <div class="modal-body" style="overflow: auto;display: flex;" id="myModalBody">

                <form class="form-horizontal m" style="width: 100%;height: 500px;" >
                    <table class="table table-hover table-primary ">
                        <caption style="font-size: x-large;font-weight: bolder;text-align: center;">下级单位</caption>
                        <thead>
                        <tr>
                            <th style="text-align: center; vertical-align: middle;"><input @click="checkAll1" id="allAndNotAll1" type="checkbox"  style="margin-right: 10px" />选择</th>
                            <th style="text-align: center; vertical-align: middle;">序号</th>
                            <th style="text-align: center; vertical-align: middle;">单位</th>
                            <th style="text-align: center; vertical-align: middle;">是否应发</th>
                            <th style="text-align: center; vertical-align: middle;">是否发放</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="(dept,index) in deptlist"  v-if="deptlist.length > 0">
                            <td style="vertical-align: middle; text-align: center;"><input name="dept" @click="checkOne1" :disabled="dept.shifouqueren!=1||dept.isshangjifafang=='1'"  :checked="dept.shifouqueren==1&&(dept.isshangjifafang=='0'||dept.isshangjifafang==null)" type="checkbox" :class="dept.shifouqueren==1&&(dept.isshangjifafang=='0'||dept.isshangjifafang==null)?'dept':''" :value="dept.deptid" /></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="index+1"></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="dept.deptname"></td>
                            <td :class="dept.shifouqueren==1?'green':'red'" style="vertical-align: middle; text-align: center;" v-text="dept.shifouqueren==1?'应发':'不应发'"></td>
                            <td :class="dept.isshangjifafang==1?'green':'red'" style="vertical-align: middle; text-align: center;" v-text="dept.isshangjifafang==1?'已发放':'未发放'"></td>
                        </tr>
                        <tr v-if="deptlist.length == 0">
                            <td style="text-align: center; vertical-align: middle" colspan="5">查无数据</td>
                        </tr>
                        </tbody>
                    </table>
                </form>

                <form class="form-horizontal m" style="width: 100%;height: 500px" >
                    <table class="table table-hover table-primary ">
                        <caption style="font-size: x-large;font-weight: bolder;text-align: center;">专家</caption>
                        <thead>
                        <tr>
                            <th style="text-align: center; vertical-align: middle;"><input @click="checkAll2" id="allAndNotAll2" type="checkbox"  style="margin-right: 10px" />选择</th>
                            <th style="text-align: center; vertical-align: middle;">序号</th>
                            <th style="text-align: center; vertical-align: middle;">专家</th>
                            <!--<th style="text-align: center; vertical-align: middle;">是否应发</th>-->
                            <th style="text-align: center; vertical-align: middle;">是否发放</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="(zhuanjia,index) in zhuanjialist"  v-if="zhuanjialist.length > 0">
                            <td style="vertical-align: middle; text-align: center;"><input name="zhuanjia" @click="checkOne2" :disabled="zhuanjia.beizhu1=='1'"  :checked="zhuanjia.beizhu1==null||zhuanjia.beizhu1=='0'" type="checkbox" :class="'zhuanjia'" :value="zhuanjia.zhuanjiaid" /></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="index+1"></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="zhuanjia.name"></td>
                            <!--<td :class="zhuanjia.isFa==1?'green':'red'" style="vertical-align: middle; text-align: center;" v-text="zhuanjia.isFa==1?'应发':'不应发'"></td>-->
                            <td :class="zhuanjia.beizhu1=='1'?'green':'red'" style="vertical-align: middle; text-align: center;" v-text="zhuanjia.beizhu1=='1'?'已发放':'未发放'"></td>
                        </tr>
                        <tr v-if="zhuanjialist.length == 0">
                            <td style="text-align: center; vertical-align: middle" colspan="4">查无数据</td>
                        </tr>
                        </tbody>
                    </table>
                </form>

            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" v-if="deptid=='000'" @click="FafangJingfei">发放</button>
                <button type="button" class="btn btn-primary" v-else @click="DeptFafangJingfei">发放</button>
            </div>
        </div>
    </div>
</div>
</div>
